package com.smart.community.region.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 店铺业主关联实体类
 * 关联表实体类，不继承BaseEntity，采用物理删除
 * 
 * @author Wu.Liang
 * @version 1.0.0
 * @since 2025-01-30
 */
@Data
@TableName("sc_shop_owner_relation")
@Schema(description = "店铺业主关联实体")
public class ShopOwnerRelation implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "关联ID")
    private Long id;
    
    @TableField("shop_id")
    @Schema(description = "店铺ID")
    private Long shopId;
    
    @TableField("owner_id")
    @Schema(description = "业主ID")
    private Long ownerId;
    
    @TableField("relation_type")
    @Schema(description = "关系类型：1-业主，2-租户，3-联合业主")
    private Integer relationType;
    
    @TableField("ownership_ratio")
    @Schema(description = "所有权比例（百分比）")
    private BigDecimal ownershipRatio;
    
    @TableField("lease_start_date")
    @Schema(description = "租赁开始日期")
    private LocalDate leaseStartDate;
    
    @TableField("lease_end_date")
    @Schema(description = "租赁结束日期")
    private LocalDate leaseEndDate;
    
    @TableField("rent_price")
    @Schema(description = "租金价格")
    private BigDecimal rentPrice;
    
    @TableField("deposit_amount")
    @Schema(description = "押金金额")
    private BigDecimal depositAmount;
    
    @TableField("contract_number")
    @Schema(description = "合同编号")
    private String contractNumber;
    
    @TableField("contract_file")
    @Schema(description = "合同文件信息")
    private String contractFile;
    
    @TableField("is_primary")
    @Schema(description = "是否主要联系人：0-否，1-是")
    private Integer isPrimary;
    
    @TableField("status")
    @Schema(description = "状态：0-禁用，1-启用")
    private Integer status;
    
    @TableField("remark")
    @Schema(description = "备注")
    private String remark;
    
    @TableField("create_time")
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
    
    @TableField("update_time")
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
    
    @TableField("create_by")
    @Schema(description = "创建人")
    private Long createBy;
    
    @TableField("update_by")
    @Schema(description = "更新人")
    private Long updateBy;
}